08. Hill Climbing
Hill Climbing
INSTRUCTOR NOTE:
Note: Thad is cavalier about switching from minimizing the objective function to maximizing the objective function because it is trivial to move back and forth in optimization problems between seeking to maximize or minimize an objective function. If you want to minimize f(x) and your optimizer program seeks to maximize the objective function, then define g(x) = -f(x) and find max(g(x)) = max(-f(x)) = min(f(x)). Similarly, if your optimization problem needs to maximize f(x) and your optimizer program seeks to minimize the objective function, define g(x) = -f(x) and find min(g(x)) = min(-f(x)) = max(f(x)).